﻿using Shuttle.Core.Infrastructure;
using Shuttle.ESB.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Nature.Core.Distributed
{
    public class EventHandlerContext<Event>
        where Event : class
    {
        HandlerContext<Event> _context;
        public EventHandlerContext(HandlerContext<Event> context)
        {
            _context = context;
        }

        public Event Message { 
            get
            {
                if (_context == null) return null;
                return _context.Message;
            }
        }
    }
}
